<div id="home_portal" style="position:relative">
    <div style="width:33%;">
        <div title="新客户" style="height:200px;">
            <table class="easyui-datagrid" style="width:650px;height:auto"
                   fit="true" border="false"
                   singleSelect="true" fitColumns="true"
                   idField="itemid">
                <thead>
                <tr>
                    <th field="CUSTOMERNAME" width="60">客户姓名</th>
                    <th field="PHONE" width="60">客户电话</th>
                    <th field="STATUS" width="60">状态</th>
                </tr>
                </thead>
                <tbody>
                <?php
                foreach ($new_customer as $c){
                    ?>
                    <tr>
                        <td><?php echo $c['customer_name']; ?></td>
                        <td><?php echo $c['phone']; ?></td>
                        <td><?php echo $c['status']; ?></td>
                    </tr>
                    <?php
                }
                ?>
                </tbody>
            </table>
        </div>

        <div title="新纪念日" style="height:200px;">
            <table class="easyui-datagrid" style="width:650px;height:auto"
                   fit="true" border="false"
                   singleSelect="true" fitColumns="true"
                   idField="itemid">
                <thead>
                <tr>
                    <th field="title" width="60">主题</th>
                    <th field="customer" width="60">客户</th>
                    <th field="memdays_type" width="80">纪念日类型</th>
                    <th field="calendar_type" width="60">日历类型</th>
                    <th field="memdays_day" width="60">纪念日</th>
                </tr>
                </thead>
                <tbody>
                <?php
                foreach ($new_memdays as $c){
                    ?>
                    <tr>
                        <td><?php echo $c['title']; ?></td>
                        <td><?php echo $c['customer']; ?></td>
                        <td><?php echo $c['memdays_type']; ?></td>
                        <td><?php echo $c['calendar_type']; ?></td>
                        <td><?php echo $c['memdays_day']; ?></td>
                    </tr>
                    <?php
                }
                ?>
                </tbody>
            </table>
        </div>
    </div>
    <div style="width:34%;">
        <div title="新联系人" style="height:200px;">
            <table class="easyui-datagrid" style="width:650px;height:auto"
                   fit="true" border="false"
                   singleSelect="true" fitColumns="true"
                   idField="itemid">
                <thead>
                <tr>
                    <th field="CONTACTER_NAME" width="60">姓名</th>
                    <th field="POSITION" width="60">职位</th>
                    <th field="EMAIL" width="80">Email</th>
                    <th field="TEL" width="60">办公电话</th>
                    <th field="PHONE" width="60">手机</th>
                </tr>
                </thead>
                <tbody>
                <?php
                foreach ($new_contacter as $c){
                    ?>
                    <tr>
                        <td><?php echo $c['contacter_name']; ?></td>
                        <td><?php echo $c['position']; ?></td>
                        <td><?php echo $c['email']; ?></td>
                        <td><?php echo $c['tel']; ?></td>
                        <td><?php echo $c['phone']; ?></td>
                    </tr>
                    <?php
                }
                ?>
                </tbody>
            </table>
        </div>
    </div>
    <div style="width:33%;">
        <div title="最新联系记录" style="height:200px;">
            <table class="easyui-datagrid" style="width:650px;height:auto"
                   fit="true" border="false"
                   singleSelect="true" fitColumns="true"
                   idField="itemid">
                <thead>
                <tr>
                    <th field="title" width="60">主题</th>
                    <th field="customer" width="60">客户</th>
                    <th field="contact_type" width="60">联系类型</th>
                    <th field="contact_time" width="60">联系时间</th>
                    <th field="status" width="60">客户状态</th>
                </tr>
                </thead>
                <tbody>
                <?php
                foreach ($new_contact_log as $c){
                    ?>
                    <tr>
                        <td><?php echo $c['title']; ?></td>
                        <td><?php echo $c['customer']; ?></td>
                        <td><?php echo $c['contact_type']; ?></td>
                        <td><?php echo date('Y-m-d',strtotime($c['contact_time'])); ?></td>
                        <td><?php echo $c['status']; ?></td>
                    </tr>
                    <?php
                }
                ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    $('#home_portal').portal({
        border: false,
        fit: true,
    });
    var panels = $('#home_portal').portal('getPanels');
    for(var i=0;i<panels.length;i++){
        $('#home_portal').portal('disableDragging',panels[i]);
    }
</script>